This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Aug 18, 2011, 8:59 AM
9 Posts

Open Notes Client application from XPages

  • Category: Other
  • Platform: Windows
  • Release: 8.5.2
  • Role: Developer
  • Tags:
  • Replies: 4
Hi ,
Good day, i am new to Xpages.
I need to open Notes Client application when user click on a button, and base on the server and path data in the document currently open.
In client , i can use this command to do that ,
;@PostedCommand([FileOpenDatabase]; Server : Path; ""; ""; "")
some simple thing in client , now become very difficult for me ...
I appreciate your help .
Thank you very much.

Regards,
Aug 18, 2011, 10:02 AM
272 Posts
Re: Open Notes Client application from XPages
Hi,
 
if you use a link you could do it with the "notes://" - Protocol:
 
 
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">

    <xp:link escape="true" text="Link" id="link1">
        <xp:this.value><![CDATA[#{javascript:
        var mailDBServer =  "<SERVERNAME>" ;
        var mailDBPath="<PATH TO MAILFILE>"; /* Pathes uses slashes not backslashes! */
        "notes://" + mailDBServer + "/" + mailDBPath;
}]]></xp:this.value>
    </xp:link>
    
</xp:view>

 
 
Sven
Aug 20, 2011, 9:52 AM
9 Posts
Re: Open Notes Client application from XPages
Hi Svan,
Thank you very much, i managed to open an application by using your suggested code. 
Curretly, i hardcode the server and file name to test out.  
 
How about i need to get the server and file name value from the current document ? 
Thank you very much ! 
 
Regards. 
Aug 20, 2011, 3:12 PM
272 Posts
Re: Open Notes Client application from XPages
If your current document is in datasource "document1", you can modify the link like this:
 
    <xp:link escape="true" text="Link" id="link1">
        <xp:this.value><![CDATA[#{javascript:
var doc = document1.getDocument();
var db = doc.getParentDatabase();
var path = db.getFilePath();
var server = db.getServer();

        "notes://" + server + "/" + path;
}]]></xp:this.value>
    </xp:link>
 
Maybe the Filepath is containing backslashes. Then you have to use f.e. @ReplaceSubstring to change them to normal slashes.
 
Sven
Aug 22, 2011, 8:08 AM
9 Posts
Re: Open Notes Client application from XPages
Hi ,
Thank you very much.
Managed to complete task finally... :)

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal